﻿using System.Linq;
using EnvDTE;

namespace SmartStringResources.Dte
{
	public static class PropertiesExtensions
	{
		public static string GetPropertyValue(this EnvDTE.Properties properties, string propertyKey)
		{
			return properties.OfType<Property>().Where(p => p.Name == propertyKey).Select(p => p.Value as string).FirstOrDefault();
		}
	}
}
